package com.ktjy.mapper;

import com.ktjy.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author lihanzhui
 * @version 1.0
 * @adte 2025/6/4 上午8:41
 */
public interface SysUserMapper {

    int count();
    List<SysUser> getUserList();
    List<SysUser> getUsersByRealName(String realName);
    List<SysUser> getUserListByPojo(SysUser sysUser);
    List<SysUser> getUserListByMap(Map<String, Object> userMap);
    List<SysUser> getUserListByParams(@Param("realName") String realName, @Param("roleId") int roleId);
    List<SysUser> getUserListWithRoleName(SysUser sysUser);
    List<SysUser> getUserListByRoleId(@Param("roleId") Integer roleId);
    SysUser getUserAndAddressesByUserId(@Param("userId") Integer userId);
    int add(SysUser user);
    int modify(SysUser user);
    int updatePwd(@Param("id") Integer id, @Param("password") String pwd);
    int deleteUserById(@Param("id") Integer id);
    //第四章示例
    List<SysUser> selectList (@Param("realName")String realName, @Param("roleId")Integer roleId);
    List<SysUser> selectListByChoose (@Param("realName")String realName, @Param("roleId")Integer roleId, @Param("account")String account, @Param("createdTime")Date createdTime);
    List<SysUser> getUserByRoleIdArray(Integer[] roleIds);
    List<SysUser> getUserByRoleIdList(List<Integer> roleList);
    List<SysUser> getUserByRoleIdMap(Map<String, Object> roleMap);
    int update(SysUser user);
    List<SysUser> selectPageList(@Param("realName")String realName
                                 ,@Param("roleId")Integer roleId
                                 ,@Param("pageBegin")Integer pageBegin
                                 ,@Param("pageSize")Integer pageSize);

}
